﻿@model IEnumerable<PiscoSourDominio.Cliente>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    WebGrid grid = new WebGrid(Model);
}
<div class="ContentAdmin">
    <h2>
        Activar Clientes</h2>
    <br />
    @grid.GetHtml(
    columns: grid.Columns(

                grid.Column(columnName: "intCliente", header: "ID", style: "text-align-center"),

                grid.Column(header: "Nombres y Apellidos", format: (item) =>
                     new HtmlString(
                                 item.vchNombre + " " + item.vchApellido
                )),

                grid.Column(columnName: "vchDireccion", header: "Dirección", style: "text-align-center"),

                grid.Column(columnName: "vchDistrito", header: "Distrito", style: "text-align-center"),

                grid.Column(columnName: "vchLogin", header: "Usuario", style: "text-align-center"),

                grid.Column(header: "Acciones", format: (item) =>
                 new HtmlString(
                           Html.ActionLink("Activar", "CambiarEstado", new { id = item.intCliente }).ToString()
                 )
            )

 ),

   tableStyle: "webgrid",
   headerStyle: "webgrid-header",
   footerStyle: "webgrid-footer",
   alternatingRowStyle: "webgrid-alternating-row",
   selectedRowStyle: "webgrid-selected-row",
   rowStyle: "webgrid-row-style")
    <br />
    <a href="@Url.Action("Index", "Home")" >Regresar</a>
</div>
